package com.nuoniu.sibanyun.entity.finance;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 应收应付单明细
 * </p>
 *
 * @author 小啊刚
 * @since 2021-04-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("fa_rec_pay_detail")
@ApiModel(value="VReceivableDetail对象", description="应收单明细")
public class VReceivablePayableDetail extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "租户ID")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "账套id")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "主订单id")
    @TableField("order_id")
    private Integer orderId;

    @ApiModelProperty(value = "项目ID")
    @TableField("project_id")
    private Integer projectId;

    @ApiModelProperty(value = "项目名称")
    @TableField("project_name")
    private String projectName;

    @ApiModelProperty(value = "项目编码")
    @TableField("project_code")
    private String projectCode;

    @ApiModelProperty(value = "存货id")
    @TableField("inventory_id")
    private Integer inventoryId;

    @ApiModelProperty(value = "存货名称")
    @TableField("inventory_name")
    private String inventoryName;

    @ApiModelProperty(value = "存货编码")
    @TableField("inventory_code")
    private String inventoryCode;

    @ApiModelProperty(value = "规格型号")
    @TableField("inventory_specification")
    private String inventorySpecification;

    @ApiModelProperty(value = "单计量id")
    @TableField("unit_id")
    private Integer unitId;

    @ApiModelProperty(value = "计量单位组ID")
    @TableField("unit_group_id")
    private Integer unitGroupId;

    @ApiModelProperty(value = "主计量ID")
    @TableField("base_unit")
    private Integer baseUnit;

    @ApiModelProperty(value = "主计量名称")
    @TableField("base_unit_name")
    private String baseUnitName;

    @ApiModelProperty(value = "主计量数量")
    @TableField("base_quantity")
    private BigDecimal baseQuantity;

    @ApiModelProperty(value = "换算率")
    @TableField("unit_exchange_rate")
    private BigDecimal unitExchangeRate;

    @ApiModelProperty(value = "税率")
    @TableField("tax_rate")
    private BigDecimal taxRate;

    @ApiModelProperty(value = "单价")
    @TableField("price")
    private BigDecimal price;

    @ApiModelProperty(value = "金额")
    @TableField("amount")
    private BigDecimal amount;

    @ApiModelProperty(value = "税额")
    @TableField("tax")
    private BigDecimal tax;

    @ApiModelProperty(value = "含税单价")
    @TableField("include_tax_price")
    private BigDecimal includeTaxPrice;

    @ApiModelProperty(value = "含税金额")
    @TableField("include_tax_amount")
    private BigDecimal includeTaxAmount;

    @ApiModelProperty(value = "关闭人")
    @TableField("closer_user_id")
    private Integer closerUserId;

    @ApiModelProperty(value = "关闭人姓名")
    @TableField("closer_user_name")
    private String closerUserName;

    @ApiModelProperty(value = "关闭时间")
    @TableField("close_date")
    private LocalDateTime closeDate;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "自定义字段数据")
    @TableField("define_fields")
    private String defineFields;

    @ApiModelProperty(value = "是否含税")
    @TableField("is_tax")
    private Boolean isTax;

    @ApiModelProperty(value = "批次")
    @TableField("batch")
    private String batch;

    @ApiModelProperty(value = "批号")
    @TableField("batch_no")
    private String batchNo;

    @ApiModelProperty(value = "发票类型id")
    @TableField("invoice_type_id")
    private Integer invoiceTypeId;

    @ApiModelProperty(value = "发票类型名称")
    @TableField("invoice_type_name")
    private String invoiceTypeName;

    @ApiModelProperty(value = "凭证线索号")
    @TableField("evidence_clue")
    private String evidenceClue;

    @ApiModelProperty(value = "凭证日期")
    @TableField("evidence_date")
    private LocalDate evidenceDate;

    @ApiModelProperty(value = "结算标识")
    @TableField("settlement_flag")
    private Integer settlementFlag;

    @ApiModelProperty(value = "来源单id")
    @TableField("source_voucher_id")
    private Integer sourceVoucherId;

    @ApiModelProperty(value = "来源单号")
    @TableField("source_voucher_code")
    private String sourceVoucherCode;

    @ApiModelProperty(value = "来源单据")
    @TableField("source_voucher_type")
    private String sourceVoucherType;

    @ApiModelProperty(value = "来源单据日期")
    @TableField("source_voucher_date")
    private LocalDate sourceVoucherDate;

    @ApiModelProperty(value = "来源明细ID")
    @TableField("source_detail_id")
    private Integer sourceDetailId;


}
